if (!update_idle)
{
- update_idle = gdk_threads_add_idle (GDK_PRIORITY_REDRAW,
+ update_idle = gdk_threads_add_idle_full (GDK_PRIORITY_REDRAW,
gdk_window_update_idle, NULL, NULL);
}
}
if (window == gdk_directfb_focused_window)
gdk_directfb_change_focus (NULL);
+
+ if (impl->drawable.surface) {
+ GdkDrawableImplDirectFB *dimpl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
+ if(dimpl->cairo_surface) {
+ cairo_surface_destroy(dimpl->cairo_surface);
+ dimpl->cairo_surface= NULL;
+ }
+ impl->drawable.surface->Release (impl->drawable.surface);
+ impl->drawable.surface = NULL;
+ }
+
if (!recursing && !foreign_destroy && impl->window ) {
impl->window->SetOpacity (impl->window,0);
impl->window->Close(impl->window);
impl->window->Release(impl->window);
+ impl->window = NULL;
}
-
-#if 0 /* let the finalizer kill it */
- if (!recursing && !foreign_destroy)
- {
- if (impl->window)
- impl->window->Destroy (impl->window);
- impl->window = NULL;
- }
-#endif
}
/* This function is called when the window is really gone.
if (!private->input_only)
{
- if (impl->drawable.surface)
- {
- GdkDrawableImplDirectFB *dimpl;
- dimpl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
- impl->drawable.surface->Release (impl->drawable.surface);
- impl->drawable.surface = NULL;
- cairo_surface_destroy(dimpl->cairo_surface);
- dimpl->cairo_surface= NULL;
- }
+ if (impl->drawable.surface) {
+ GdkDrawableImplDirectFB *dimpl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
+ if(dimpl->cairo_surface) {
+ cairo_surface_destroy(dimpl->cairo_surface);
+ dimpl->cairo_surface= NULL;
+ }
+ impl->drawable.surface->Release (impl->drawable.surface);
+ impl->drawable.surface = NULL;
+ }
parent_impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (private->parent)->impl);